package com.jandar.controller;

import com.cl.mvc.controller.BaseController;
import com.jandar.entity.ExcelPerson;
import com.jandar.service.ExcelPersonService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("ExcelPerson")
public class ExcelPersonController extends BaseController<ExcelPerson> {
    private final ExcelPersonService excelPersonService;
    public ExcelPersonController(ExcelPersonService service) {
        super(service);
        this.excelPersonService = service;
    }

    @GetMapping("countDetail")
    public List<Map<String, Object>> countDetail(@RequestParam("personId") Integer personId,@RequestParam("queryField") String queryField) {
        return excelPersonService.countDetail(personId,queryField);
    }
}
